package com.wctj.api.business.common.dto;

import com.wctj.api.base.enums.PayBusinessTypeEnums;
import com.wctj.api.base.enums.PayChannelEnums;
import com.wctj.api.base.enums.PlatformEnums;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;

/**
 * 支付订单信息
 *
 */
public class PayOrderDTO extends BasePayConfigDTO {
    /**
     * 商品名称
     */
    @NotEmpty(message = "商品标题不能为空")
    private String title;

    /**
     * 商品描述
     */
    private String description;

    /**
     * 附加信息
     */
    private String addition;

    /**
     * 价格
     */
    @NotNull(message = "商品价格不能为空")
    private BigDecimal price;

//    /**
//     * 订单过期时间
//     */
//    private Date expirationTime;

    /**
     * 商户代码
     */
    @NotBlank(message = "商户代码不能为空")
    private String mchntCd;

    /**
     * 商户的 app_id
     */
    @NotBlank(message = "商户的 app_id")
    private String appId;

    /**
     * 操作用户名
     */
    @NotBlank(message = "操作用户名")
    private String operatorBy;

    /**
     * 请求支付类型
     */
    @NotNull(message = "支付类型(Recharge 充值，settlement 结算，Withdrawal 取现)不能为空")
    PayBusinessTypeEnums payBizType;

    /**
     * 操作平台
     */
    @NotNull(message = "操作平台不能为空")
    PlatformEnums platform;

    /**
     *  支付类型对应的 openId,比如 微信：openId, 支付宝：buyer_id ....
     */
    private String openId;

    /**
     * 使用的支付渠道类型
     * {@link PayChannelEnums}
     */
    @NotNull(message = "支付渠道类型不能为空")
    private PayChannelEnums payChannel;

    /**
     * 业务订单号
     */
    @NotBlank(message = "业务订单号不能为空")
    private String bizOrderNum;

    /**
     * 调用方业务编码
     */
    @NotBlank(message = "业务编码(需要平台唯一性,同联调人员沟通申请)不能为空")
    private String bizCode;

    @NotBlank(message = "异步回调地址不能为空")
    private String notifyUrl;

    public String getOperatorBy() {
        return operatorBy;
    }

    public void setOperatorBy(String operatorBy) {
        this.operatorBy = operatorBy;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public String getAddition() {
        return addition;
    }

    public void setAddition(String addition) {
        this.addition = addition;
    }

    public BigDecimal getPrice() {
        return price;
    }

    public void setPrice(BigDecimal price) {
        this.price = price;
    }

    public String getMchntCd() {
        return mchntCd;
    }

    public void setMchntCd(String mchntCd) {
        this.mchntCd = mchntCd;
    }

    public String getAppId() {
        return appId;
    }

    public void setAppId(String appId) {
        this.appId = appId;
    }

    public PayBusinessTypeEnums getPayBizType() {
        return payBizType;
    }

    public void setPayBizType(PayBusinessTypeEnums payBizType) {
        this.payBizType = payBizType;
    }

    public PlatformEnums getPlatform() {
        return platform;
    }

    public void setPlatform(PlatformEnums platform) {
        this.platform = platform;
    }

    public String getOpenId() {
        return openId;
    }

    public void setOpenId(String openId) {
        this.openId = openId;
    }

    public PayChannelEnums getPayChannel() {
        return payChannel;
    }

    public void setPayChannel(PayChannelEnums payChannel) {
        this.payChannel = payChannel;
    }

    public String getBizOrderNum() {
        return bizOrderNum;
    }

    public void setBizOrderNum(String bizOrderNum) {
        this.bizOrderNum = bizOrderNum;
    }

    public String getBizCode() {
        return bizCode;
    }

    public void setBizCode(String bizCode) {
        this.bizCode = bizCode;
    }

    public String getNotifyUrl() {
        return notifyUrl;
    }

    public void setNotifyUrl(String notifyUrl) {
        this.notifyUrl = notifyUrl;
    }

//    /**
//     * 商户前端页面地址，支付成功或失败时，会向该地址跳转
//     */
//    private String callbackUrl;

}
